<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .class1{
            width: 694px;
            height: 50px;
            margin: 10px auto;
        }
        .class1>a{
            border: 1px yellowgreen solid;
            height: 48px;
            width: 98px;
            text-align: center;
            float: left;
            margin-left: -1px;
            text-align: center;
            text-decoration: none;
            line-height: 48px;
        }
        a:hover{
            background-color: gold;
            color: white;
        }
    </style>
</head>
<body>
    <div class="class1">
        <a href="#">首页</a>
        <a href="#">首页</a>
        <a href="#">首页</a>
        <a href="#">首页</a>
        <a href="#">首页</a>
        <a href="#">首页</a>
        <a href="#">首页</a>
    </div>
</body>
</html>